home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 January: Mac OS SDK / Dev.CD Jan 97 SDK2.toast / Development Kits (Disc 2) / OpenDoc Development Framework / ODF-Interest Archive / June 96 / Enable⁄Disable all menu items < prev    next >
Encoding:
Internet Message Format  |  1996-12-03  |  1.6 KB  |  [TEXT/ttxt]

  1. Subject:     Enable/Disable all menu items
  2. Sent:        6/8/96 12:17 PM
  3. Received:    6/10/96 8:59 AM
  4. From:        Nolan Larsen, nlarsen@dharbor.com
  5. Reply-To:    ODF Interest, ODF-Interest@CILabs.ORG
  6. To:          OpenDoc Development Framework Discussion List, ODF-Interest@CILabs.
  7.  
  8. I came across a couple of bugs in the file FWPullDM.cpp of ODF d11 and sent
  9. the following message. After making the switch to R1 I have found that the
  10. same bug exists. Will this be fixed in a future version?
  11.  
  12. The FW_CPullDownMenu::EnableAll method uses the following code:
  13.  
  14.         (*fPlatformMenu)->enableFlags &= 0xFFFFFFFF;
  15.  
  16. ANDing everything with 1 does nothing to enableFlags. In fact, the compiler
  17. optimizes the code out so nothing is generated to enable the menus. The
  18. following will produce the desired effect:
  19.  
  20.         (*fPlatformMenu)->enableFlags = 0xFFFFFFFF;
  21.  
  22.  
  23. The FW_CPullDownMenu::DisableAll has a slightly different problem. It uses
  24. the following line of code to disable all of the menu items:
  25.         (*fPlatformMenu)->enableFlags &= 0x00000001;
  26. This code does disable all of the items but does not disable the menu
  27. itself. According to the HI guidelines, if all menu items are disabled the
  28. menu title should also be disabled. The following is more in keeping with
  29. the guidelines:
  30.  
  31.         (*fPlatformMenu)->enableFlags = 0x00000000;
  32.  
  33. Thanks,
  34. Nolan
  35.  
  36. =========================================================================
  37. Nolan Larsen                                         Digital Harbor
  38. nlarsen@dharbor.com                             "Pier-to-Pier Computing"
  39. =========================================================================
  40.  
  41.